feat: add config embedding#448
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for embedding an initial Talos machine configuration into generated schematics/images, gated behind Enterprise functionality and Talos version support, and exposes the option in the HTTP wizard UI.
Changes:
- Extend the schematic customization model to carry an embedded machine configuration string.
- Add an Enterprise
ConfigEmbedderhook and wire it through the HTTP frontend and service wiring. - Add UI wizard fields + localization for entering embedded machine config, and propagate the field into the Talos imager profile.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/schematic/schematic.go | Adds EmbeddedMachineConfiguration to schematic customization YAML model. |
| pkg/enterprise/enterprise.go | Introduces ConfigEmbedder interface in the Enterprise glue layer. |
| pkg/enterprise/enterprise_on.go | Wires enterprise implementation via NewConfigEmbedder() under enterprise build. |
| pkg/enterprise/enterprise_off.go | Returns nil embedder when enterprise is disabled. |
| enterprise/config/config_embedder.go | Implements the enterprise embedder (sets schematic embedded config). |
| internal/profile/profile.go | Propagates embedded machine config from schematic into Talos profile customization. |
| internal/frontend/http/http.go | Plumbs ConfigEmbedder into the HTTP frontend instance. |
| internal/frontend/http/ui.go | Adds wizard params, form parsing, UI gating, and schematic embedding call. |
| internal/frontend/http/templates/wizard-cmdline.html | Adds textarea for embedded machine configuration when enabled. |
| internal/frontend/http/templates/wizard-final.html | Updates back navigation params to include embedded-config selection. |
| internal/frontend/http/templates/common.html | Persists embedded-config values via hidden inputs across wizard steps. |
| internal/frontend/http/locales/active.en.yaml | Adds English strings for embedded config UI text. |
| internal/frontend/http/locales/active.fr.yaml | Adds French strings for embedded config UI text. |
| internal/frontend/http/locales/active.pl.yaml | Adds Polish strings for embedded config UI text. |
| internal/frontend/http/locales/active.ru.yaml | Adds Russian strings for embedded config UI text. |
| internal/frontend/http/css/output.css | Updates compiled Tailwind output to include new utility usage. |
| cmd/image-factory/cmd/service.go | Passes enterprise.NewConfigEmbedder() into the HTTP frontend constructor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
smira
left a comment
There was a problem hiding this comment.
we also need:
- docs/api.md update for new schematic field (Enterprise only note)
- integration tests, preferably based on the ones which extract initramfs to verify that embedded config gets actually embedded (I believe we already verify extensions, and this should be an extension?)
smira
left a comment
There was a problem hiding this comment.
please stop pushing PRs to origin (push to your fork)
6ead978 to
731c88c
Compare
|
e2e test failure is unrelated |
smira
left a comment
There was a problem hiding this comment.
probably also deserves a note in hack/release.toml
| # optional, include well-known UEFI certificates into auto-enrollment database (SecureBoot ISO only) | ||
| includeWellKnownCertificates: true | ||
| bootloader: sd-boot # optional, defaults to auto (bootloader chosen by imager), other options: dual-boot, grub | ||
| embeddedMachineConfiguration: | # optional, embedded machine configuration (YAML-encoded) |
There was a problem hiding this comment.
can we put an example of using two documents, so it's not confusing
ba9bb9d to
7bd0701
Compare
allow embedding machine configuration into Talos images. Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com>
|
/m |
allow embedding initial machine config for enterprise image factory.
the download integration test needed some extra work to get it running with talos 1.13